package org.sifu500w.sifu.web.action;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.struts2.convention.annotation.Namespace;
import org.sifu500w.common.constant.NetworkLine;
import org.sifu500w.common.web.action.ModelDrivenAbstractAction;
import org.sifu500w.sifu.constant.SifuType;
import org.sifu500w.sifu.web.model.SifuInfoModel;

@Namespace(value="/sifu")
public class PublishAction extends ModelDrivenAbstractAction<List<SifuInfoModel>> {

	@Override
	public List<SifuInfoModel> getModel() 
	{
		return sifuInfos;
	}
	
	public SifuType getSifuType() {
		return sifuType;
	}

	public void setSifuType(SifuType sifuType) {
		this.sifuType = sifuType;
	}
	
	/** 私服信息对象 */
	private List<SifuInfoModel> sifuInfos = new ArrayList<SifuInfoModel>();
	/** 私服类型，用于接收前台参数 */
	private SifuType sifuType;

	private static final long serialVersionUID = -9190319242874990411L;
	
	{
		SifuInfoModel sifuInfo = new SifuInfoModel();
		sifuInfo.setName("▊▊超爽（中变）▊▊");
		sifuInfo.setIp("192.168.111.111");
		sifuInfo.setPublishDate(new Date());
		sifuInfo.setNetworkLine(NetworkLine.CHINA_TELECOM);
		sifuInfo.setSummary("稳定、极速、公平");
		sifuInfo.setQq("139999361");
		
		sifuInfos.add(sifuInfo);
	}
}